//
//  HMSportTracking.h
//  黑马行
//
//  Created by 宇宙执政 on 16/9/19.
//  Copyright © 2016年 yujianbinMAC. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HMSportTrackingLine.h"

///运动类型枚举
typedef enum: NSUInteger{
    
    HMSportTypeRun,
    HMSportTypeWalk,
    HMSportTypeBike,
    
} HMSportType;

///运动状态枚举
typedef enum: NSUInteger{
    
    HMSportStatePause,
    HMSportStateContinue,
    HMSportStateFinish,
    
}HMSportState;


////运动轨迹追踪模型
@interface HMSportTracking : NSObject


-(instancetype)initWithType:(HMSportType)type state:(HMSportState)state;

///运动状态
@property(nonatomic,assign)HMSportState sportState;


///运动类型
@property(nonatomic, assign, readonly)HMSportType sportType;

@property(nonatomic, strong,readonly)CLLocation *startLocation;


///运动图像
@property(nonatomic, strong, readonly) UIImage *sportImage;

///平均速度
@property(nonatomic, readonly)double avgSpeed;

///最大速度
@property(nonatomic, readonly)double maxSpeed;

///总时长
@property(nonatomic, readonly)double totalTime;

///总距离
@property(nonatomic, readonly)double totalDistance;


///添加位置信息，返回折线
- (MAPolyline *)appendLocation:(CLLocation *)location;

@end
